<?include("../../config/config.php");
$DM->loadClass("tracker","page");
// create and instance class
$object_page = new page();
$object_page->getList();
?>
<html>
<head>
<title>page</title>
<link href="../../resource/includes/css/admin.css" type="text/css" rel="stylesheet" rev="stylesheet" />
<script>
function apagar(_id){
	if (confirm('Erase this item from the system?')){
		window.location.href='page.delete.php?id='+_id+'&apagar=apag';
	}
}
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#efefef"  width='600'>
	<tr align=left>
		<td height='25' colspan='6' class='titleTd'>LISTA DE PAGE</td>
	</tr>		
	<tr align='center'>
		<td height='25' colspan='6' align='center'><a href=page.edit.php class='mainAction'>ADICIONAR NOVA page</a></td>
	</tr>		
	<tr align='center'>
		<td height='25' colspan='6' bgcolor="#FFFFFF"></td>
	</tr>		
	<tr>		<td class='titleTd' align='center'>ID</td>
		<td class='titleTd' align='center'>Site</td>
		<td class='titleTd' align='center'>url</td>
		<td class='titleTd' align='center'>queryString</td>
		<td class='titleTd' align='center'>Optional Title</td>
		<td class='titleTd' align='center'>Actions</td>
	</tr>
<?
for ($i=0;$i<count($object_page->lista);$i++){
$line = $line!="line1"?"line1":"line2";
	$object_page->id_page=$object_page->lista[$i][id_page];
	$object_page->getById();
	echo "<TR>
<td align='center' class='<?=$line?>'>$object_page->id_page</td>
<td align='center' class='<?=$line?>'>$object_page->id_site</td>
<td align='center' class='<?=$line?>'>$object_page->txt_url</td>
<td align='center' class='<?=$line?>'>$object_page->txt_query</td>
<td align='center' class='<?=$line?>'>$object_page->title</td>
		<td align='center'><a class='minorAction' href='page.edit.php?id=$object_page->id_page'>editar</a> - <a class='minorAction' href='javascript:apagar($object_page->id_page);'>apagar</a></td>
	";
	echo "</TR>";
}
?>
</table></body></html>